package archive

import (
	"github.com/flipped-aurora/gin-vue-admin/server/api/v1"
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type ArchiveTypeRouter struct {
}

// InitArchiveTypeRouter 初始化 档案类型 路由信息
func (s *ArchiveTypeRouter) InitArchiveTypeRouter(Router *gin.RouterGroup,PublicRouter *gin.RouterGroup) {
	archiveTypeRouter := Router.Group("archiveType").Use(middleware.OperationRecord())
	archiveTypeRouterWithoutRecord := Router.Group("archiveType")
	archiveTypeRouterWithoutAuth := PublicRouter.Group("archiveType")

	var archiveTypeApi = v1.ApiGroupApp.ArchiveApiGroup.ArchiveTypeApi
	{
		archiveTypeRouter.POST("createArchiveType", archiveTypeApi.CreateArchiveType)   // 新建档案类型
		archiveTypeRouter.DELETE("deleteArchiveType", archiveTypeApi.DeleteArchiveType) // 删除档案类型
		archiveTypeRouter.DELETE("deleteArchiveTypeByIds", archiveTypeApi.DeleteArchiveTypeByIds) // 批量删除档案类型
		archiveTypeRouter.PUT("updateArchiveType", archiveTypeApi.UpdateArchiveType)    // 更新档案类型
	}
	{
		archiveTypeRouterWithoutRecord.GET("findArchiveType", archiveTypeApi.FindArchiveType)        // 根据ID获取档案类型
		archiveTypeRouterWithoutRecord.GET("getArchiveTypeList", archiveTypeApi.GetArchiveTypeList)  // 获取档案类型列表
	}
	{
	    archiveTypeRouterWithoutAuth.GET("getArchiveTypePublic", archiveTypeApi.GetArchiveTypePublic)  // 获取档案类型列表
	}
}
